package com.example.littleSpider.myapplication.activity;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.example.littleSpider.myapplication.R;
import com.example.littleSpider.myapplication.adapter.VideoListAdapter;
import com.example.littleSpider.myapplication.base.BaseActivity;
import com.example.littleSpider.myapplication.bean.MyBean;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * Created by SPIDE on 2017/12/7.
 */

public class CityListActivity extends BaseActivity {

    @BindView(R.id.recycler_view)
    RecyclerView mRecyclerView;

    @Override
    protected int getLayoutRes() {
        return R.layout.activity_city_list;
    }

    @Override
    protected void initView() {
        List<MyBean> myBeans = new ArrayList<>();
        List<String> list = new ArrayList<>();
        for (int i = 0; i < 20; i++){
            MyBean myBean = new MyBean();
            myBean.setName("position:" + i);
            list.add("position:" + i);
        }
        VideoListAdapter videoListAdapter = new VideoListAdapter(R.layout.fragment_test, list);
        mRecyclerView.setAdapter(videoListAdapter);
        mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
    }

    @Override
    protected void initData() {

    }

    @OnClick(R.id.rl_back)
    public void back(){
        finish();
    }
}
